package com.toivan.mt.fragment;

import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.shizhefei.fragment.LazyFragment;
import com.toivan.mt.R;
import com.toivan.mt.adapter.MtFaceShapeAdapter;
import com.toivan.mt.model.MtFaceShape;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;


public class MtFaceShapeFragment extends LazyFragment {

    private final List<MtFaceShape> faceTrimList = new ArrayList<>();

    @Override
    protected void onCreateViewLazy(Bundle savedInstanceState) {
        super.onCreateViewLazy(savedInstanceState);

        setContentView(R.layout.fragment_recyclerview);

        faceTrimList.clear();
        faceTrimList.addAll(Arrays.asList(MtFaceShape.values()));

        RecyclerView faceShapeRV = (RecyclerView) findViewById(R.id.recyclerView);
        MtFaceShapeAdapter adapter = new MtFaceShapeAdapter(faceTrimList);
        faceShapeRV.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
        faceShapeRV.setAdapter(adapter);
    }
}
